package com.aigc.txt2img.dao;

import com.aigc.txt2img.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {

    int addUser(User user);

    User getByID(int id);

    int updateUser(User user);

    int deleteUser(int id);

    @Select("select * from user order by id desc  limit #{offset},#{size} ")
    List<User> getList(@Param("offset") int offset, @Param("size") int size);

}
